<?
class Ticket extends genericClass {
  function Save()
  {
    if ($this->Code=="")
      {
	$before_line = $GLOBALS['Systeme']->Modules["Banque"]->callData("Banque/Ticket","",0,1000000,"","","MAX(Id)");
	$before_line = $before_line[0]["MAX(Id)"];
	$file_ref = fopen("../Codes/mdp_unsort.bdd","r");
	$line = 0;
	for ($i = $line;$i<$before_line;$i++)
	{
		fgets($file_ref);
		$line++;
	}
	$code = str_replace(array("\r\n", "\n", "\r"),"",fgets($file_ref));
	$this->Set("Code",$code);
	$this->Code = $code;
      }
    return genericClass::Save();
  }
}
?>